﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Business
{
    public class ChiTietDonDatNCC
    {
        
        public int MaCTDDH { get; set; }
        public string MaCTDDHHienThi 
        {
            get
            {
                return "CTDDNCC" + MaCTDDH;
            }
        }
        public int MaDDH { get; set; }        
        public int MaHang { get; set; }
        public string MaHangHienThi 
        {
            get 
            {
                return "HH" + MaHang;
            }
        }
        public string TenHang { get; set; }
        public int SoLuong { get; set; }
        public double GiaNhap { get; set; }
       

       
        public ChiTietDonDatNCC(int maDDH, int maHang,
            string tenHang, int soLuong, double giaBan)
        {
            this.MaCTDDH = 0;
            this.MaDDH = maDDH;
            this.MaHang = maHang;
            this.SoLuong = soLuong;
            this.GiaNhap = giaBan;
            this.TenHang = tenHang;
        }

        public ChiTietDonDatNCC(int maCTDDH, int maDDH, int maHang, 
            string tenHang, int soLuong, double giaNhap) 
        {
            this.MaDDH = maDDH;
            this.MaCTDDH = maCTDDH;
            this.MaHang = maHang;
            this.SoLuong = soLuong;
            this.GiaNhap = giaNhap;
            this.TenHang = tenHang;
        }

        public void CapNhat(int maHang,
            string tenHang, int soLuong, double giaNhap)
        {
            this.MaHang = maHang;
            this.SoLuong = soLuong;
            this.GiaNhap = giaNhap;
            this.TenHang = tenHang;
        }
       
    }
}
